package com.maiji.cloud.response;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@NoArgsConstructor
@Data
@Accessors(chain=true)
public class BaseResDto {

    @ApiModelProperty(value="响应状态")
    private Status status;
    @ApiModelProperty(value="响应信息")
    private String message;

    public BaseResDto(Status status) {
        this.status = status;
        this.message = status.getMessage();
    }
    
    public BaseResDto(Status status,String message) {
    	this.status = status;
    	this.message = message;
    }

    public void setStatus(Status status) {
        this.status = status;
        this.message = status.getMessage();
    }

    public BaseResDto setStatusR(Status status) {
        this.status = status;
        this.message = status.getMessage();
        return this;
    }

    public static BaseResDto baseResDto(Status status, String message) {
    	BaseResDto resp = new BaseResDto();
		resp.status = (status);
		resp.message = (message);
		return resp;
	}
    
    

}
